<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<form id="userForm" class="form">
  <input type="hidden" name="id" value="${user.id}">
  <div class="form-item required">
    <label for="account">账号</label>
    <input  readonly="true" name="account" type="text" class="easyui-textbox" value="${user.account }" style="width: 202px">
  </div>
  <div class="form-item required">
    <label for="password">密码</label>
    <input id="password" name="password" type="password"  class="easyui-textbox" style="width: 202px" data-options="required:${not empty user ? 'false' : 'true' }">
  </div>
  <div class="form-item required">
    <label for="userName">姓名</label>
    <input id="userName" name="name" type="text" class="easyui-textbox" data-options="required:true" value="${user.name}">
  </div>
  <div class="form-item">
    <label for="roles">角色</label>
    <select id="roles" name="roles" data-options="value:'${user.roles[0].id}'"  class="easyui-combobox" editable="false" panelHeight="auto" multiple="true" style="width: 202px">
   		 <c:forEach items="${roles}" var="r">	
   			 <option value="${r.id}">${r.name}</option>
   		 </c:forEach>
    </select>
  </div>
  <div class="form-item">
   <label for="enable">状态</label>
    <input id="enable" name="enable" class="easyui-switchbutton" data-options="onText:'启用',offText:'禁用',checked:${empty user || user.enable == true  ?'true' : 'false' }">
  </div>
</form>
